<template>
	<view>
		<custom-navi :show-home="false">铃声设置</custom-navi>
			<radio-group @change="radioChange" class="bellSet">
				<view class="bellSet-option" v-for="(unit,index) in bellArray" :key="unit.reference">
					<view class="text">{{unit.value}}</view>
					<view class="radio">
						<radio :value="unit.reference" :checked="unit.reference===bell" color="#0CD4D3" style="transform:scale(0.7)"/>
					</view>
				</view>
			</radio-group>
	</view>
</template>

<script>
	import settings from "../../../../../settings.js";
	export default {
		data() {
			return {
				bellArray: [{
					reference:0,
					value:'经典女声版'
				},{
					reference:1,
					value:'粤语方言'
				},{
					reference:2,
					value:'成都话方言'
				}],
				bell: settings.bell
			}
		},
		methods: {
			radioChange: function(e){
				console.log(e.target.value)
				settings.setBell(parseInt(e.target.value));
			}
		}
	}
</script>

<style lang="scss" scoped>
	.bellSet {
		&-option {
			margin-top: 30rpx;
			height: 120rpx;
			display: flex;
			align-items: center;
			background: rgba(255, 255, 255, 1);
			padding: 0 32rpx;

			.text {
				width: 620rpx;
				color: rgba(153, 153, 153, 1);
				opacity: 1;
			}
			
			.radio {
				opacity: 1;
				line-height: 40rpx;
				opacity: 1;
				text-align: right;
				margin-left: 10rpx;
			}

		}
	}
</style>
